Skip to content

feat(openclaw): enhance example with configuration options#413

Open
Jah-yee wants to merge 2 commits intoalibaba:mainfrom
Jah-yee:main
Open

feat(openclaw): enhance example with configuration options#413
Jah-yee wants to merge 2 commits intoalibaba:mainfrom
Jah-yee:main

Conversation

@Jah-yee
Copy link

@Jah-yee Jah-yee commented Mar 10, 2026

Summary

Enhance the OpenClaw example with better configuration options and documentation:

Changes

  • Environment Variable Support: Add support for OPENCLAW_SERVER, OPENCLAW_IMAGE, OPENCLAW_TIMEOUT, OPENCLAW_TOKEN, OPENCLAW_PORT
  • Expanded Network Policy: Allow GitHub API access in addition to PyPI
  • Improved README: Add configuration tables, advanced usage section, and custom port documentation
  • Security Improvement: Truncate token in log output

Usage

# Using environment variables
export OPENCLAW_SERVER=http://localhost:8080
export OPENCLAW_IMAGE=ghcr.io/openclaw/openclaw:latest
export OPENCLAW_TIMEOUT=3600
export OPENCLAW_TOKEN=your-token
export OPENCLAW_PORT=18789

uv run python examples/openclaw/main.py

Testing

  • Code follows existing patterns
  • Backward compatible with existing usage

Related

  • Part of OpenClaw integration with OpenSandbox

… defaults

- Add environment variable support for server, image, timeout, token, port
- Expand network policy to allow GitHub API access
- Improve README with configuration tables and advanced usage
- Add custom gateway port documentation
- Add token truncation in log output for security
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


OpenClaw Bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

- Change network_mode from Literal['host', 'bridge'] to str to allow
  user-defined network names
- Remove startup-time validation that blocked custom networks
- Update port-mapping logic to handle any non-host network mode
- Update endpoint resolution to work with user-defined networks

This enables OpenSandbox to work in Docker Compose setups with shared
user-defined networks (e.g., app-net), allowing sandbox containers to
communicate with other services like databases by hostname.
@Jah-yee Jah-yee requested a review from Generalwin as a code owner March 11, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants